package com.zyp.composite;


/**
 * 
 *	抽象接口，用于确定子节点所做的操作
 */
public abstract class IComponent {
	
	private String name;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public IComponent(String name){
		this.name=name;
	}
	/**
	 * 添加子节点
	 * @param component
	 */
	public abstract void add(IComponent component);
	/**
	 * 删除子节点
	 * @param component
	 */
	public abstract void remove(IComponent component);
	
	/**
	 * 展示
	 * @param depth
	 */
	public abstract void display(int depth);
	

}
